import Vue from 'vue'
import VueRouter from 'vue-router'
import SelectRole from '@/views/login/SelectRole.vue'
import LoginView from '@/views/login/LoginView.vue'
import RegisterView from '@/views/login/RegisterView.vue'
import GameView from '@/views/gameServer/GameView.vue'
import GameTest from '@/views/table/GameTest.vue'
import SortView from '@/views/boss/SortView.vue'
import OrderView from '@/views/boss/OrderView.vue'
import commentBoss from '@/views/boss/commentBoss.vue'
import CollectTable from '@/views/table/CollectTable.vue'
import bossNew from '@/views/boss/bossNew.vue'
import paymentView from '@/views/boss/paymentView.vue'
import resetView from '@/views/boss/resetView.vue'
import ShopView from '@/views/gameServer/ShopView.vue'
import ShopGameView from '@/views/gameServer/ShopGameView.vue'
import CollectView from '@/views/gameServer/CollectView.vue'
import MaxdataView from '@/views/gameServer/MaxdataView.vue'
import AdminView from '@/views/admin/AdminView.vue'
import UserView from '@/views/admin/UserView.vue'
import adGame from '@/views/admin/adGame.vue'
import adOrder from '@/views/admin/adOrder.vue'
import adShopcar from '@/views/admin/adShopcar.vue'
import adgameKu from '@/views/admin/adgameKu.vue'
import adNew from '@/views/admin/adNew.vue'
import adPayment from '@/views/admin/adPayment.vue'
import adSort from '@/views/admin/adSort.vue'
import adgameList from '@/views/admin/adgameList.vue'
import adReset from '@/views/admin/adReset.vue'
import adCollect from '@/views/admin/adCollect.vue'
import LoginAdmin from '@/views/login/LoginAdmin.vue'
import LoginUser from '@/views/login/LoginUser.vue'
import UserSide from '@/views/user/UserSide.vue'
import UserGame from '@/views/user/UserGame.vue'
import GameDetail from '@/views/user/GameDetail.vue'
import shopCar from '@/views/user/shopCar.vue'
import GameKu from '@/views/user/GameKu.vue'
import gameOrder from '@/views/user/gameOrder.vue'
import UserNew from '@/views/user/UserNew.vue'
import RechargeView from '@/views/user/RechargeView.vue'
import ResetView from '@/views/user/ResetView.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/',
      name: 'home',
      component: SelectRole
    },
    {
      path: '/emp',
      name: 'emp',
      component:  () => import('../views/gameServer/EmpView.vue')
    },
    {
      path: '/dept',
      name: 'dept',
      component: () => import('../views/gameServer/DeptView.vue')
    },
    {
      path: '/login',
      name: 'login',
      component: LoginView
    },
    {
      path: '/register',
      name: 'register',
      component: RegisterView
    },
    {
      path: '/game',
      name: 'game',
      component: GameView,
      children: [
        {path:'/gametest',component:GameTest},
        {path:'/sortview',component:SortView},
        {
          path:'/order',
          name:'order',
          component:OrderView
        
      },
      {
        path:'/commentboss',
        component:commentBoss
      },
      {
        path:'/collectable',
        component:CollectTable
      },
      {
        path:'/bossnew',
        component:bossNew
      },
      {
        path:'/paymentview',
        component:paymentView
      },
      {
        path:'/resetbossview',
        component:resetView
      }
      ]
    },
    {
      path: '/shop',
      name: 'shop',
      component: ShopView
    },
    {
      path: '/register',
      name: 'register',
      component:RegisterView
    },
    {
      path: '/shopman',
      name: 'shopman',
      component:ShopGameView
    },
    {
      path: '/collect',
      name: 'collect',
      component:CollectView
    },
    {
      path:'/maxdata',
      name:'maxdata',
      component:MaxdataView
    },
    {
      path:'/adminview',
      name:'adminview',
      component:AdminView,
      children: [
        {path:'/userview',component:UserView},
        {path:'/gametest',component:GameTest},
        {path:'/sortview',component:SortView},
        {
          path:'/adgame',
          component:adGame
        },
        {
          path:'/adorder',
          component:adOrder
        },
        {
          path:'/adshopcar',
          component:adShopcar
        },
        {
          path:'/adgameku',
          component:adgameKu
        },
        {
          path:'/adnew',
          component:adNew
        },
        {
          path:'/adpayment',
          component:adPayment
        },
        {
          path:'/adsort',
          component:adSort
        },
        {
          path:'/adgamelist',
          component:adgameList
        },
        {
          path:'/adreset',
          component:adReset
        },
        {
          path:'/adcollect',
          component:adCollect
        },
       
      ]
    },
  {
    path:'/adminview',
    name:'adminview',
    component:AdminView
  },
  {
    path: '/loginadmin',
    name: 'loginadmin',
    component: LoginAdmin 
  },
  {
    path:'/loginuser',
    name:'loginuser',
    component:LoginUser
  
  
  },
  {
    path:'/userside',
    name:'userside',
    component:UserSide,
    children: [
      {
        path:'/usergame',
        name:'usergame',
        component:UserGame    
      },
      {
        path:'/gamedetail',
        name:'gamedetail',
        component:GameDetail
      },
      {
        path:'/shopcar',
        component:shopCar
      },
      {
        path:'/gameku',
        component:GameKu
      },
      {
        path:'/gameorder',
        component:gameOrder
      },
      {
        path:'/usernew',
        component:UserNew
      },
      {
        path:'/rechargeview',
        component:RechargeView
      },
      {
        path:'/resetview',
        component:ResetView
      }
    ]
  
  }
  
  ]
})

export default router
